/**
 * 产品详情js
 */
$(function(){
	//定制量尺页面
	$("#workflow").delegate("#dzlc","click",function(){
		window.open("/"+Udwin.appName+"/resources/html/dzlc.html");
	})
	
	$("body").delegate("#productLocation","click",function(){
		window.location.href="/"+Udwin.appName+"/product/list?curPage=1&pageSize=9&locationUuid="+$("#productLocation").attr("value");
	})
	
	//产品详情
	$("body").delegate("#detail","click",function(){
		var queryParams = {};
		queryParams.imageLocation = '1';
		searchProductImgs(queryParams);
	})
	//材质说明
	$("body").delegate("#material","click",function(){
		var queryParams = {};
		queryParams.imageLocation = '2';
		searchProductImgs(queryParams);
	})
	//售后服务
	$("body").delegate("#safeguard","click",function(){
		var queryParams = {};
		queryParams.imageLocation = '3';
		searchProductImgs(queryParams);
	})
	
	var searchProductImgs = function(queryParams){
		queryParams.productUuid = $("#productUuid").val();
		$.ajax({
			url:"/"+Udwin.appName+"/product/searchProductDetailImgs",
			data:queryParams,
			method:"POST",
			success:function(data){
				$("#productDetailImgs").empty().html(data);
			}
		});
	}
})